package com.xyoto.community.controller;

import com.xyoto.community.dto.SaveDynamicForwardDTO;
import com.xyoto.community.service.DynamicForwardService;
import com.xyoto.community.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dynamic")
@Api(value = "动态转发（前台）",tags = "动态转发（前台）")
public class DynamicForwardController {

    @Autowired
    private DynamicForwardService dynamicForwardService;

    @ApiOperation(value = "新增动态转发（前台）", notes = "新增动态转发")
    @PostMapping("/saveForwardDynamic")
    public Result saveForwardDynamic(@RequestBody @Validated SaveDynamicForwardDTO dynamicForwardDTO){
        return dynamicForwardService.saveForwardDynamic(dynamicForwardDTO);
    }

}
